oracle.hadoop.balancer.examples.movie

## Class MovieGenre.MovieGenreReducer

- java.lang.Object
- - org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>
  - - oracle.hadoop.balancer.examples.movie.MovieGenre.MovieGenreReducer

- Enclosing class:
    MovieGenre

      public static class MovieGenre.MovieGenreReducer
      extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>

  Reducer class for movie-demo example. In each line, it list genre-id followed by a list of movie-ids.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer

      `org.apache.hadoop.mapreduce.Reducer.Context`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MovieGenre.MovieGenreReducer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `reduce(org.apache.hadoop.io.IntWritable genreID, java.lang.Iterable<org.apache.hadoop.io.IntWritable> movieIDs, org.apache.hadoop.mapreduce.Reducer.Context context)` The reduce function.

    - ### Methods inherited from class org.apache.hadoop.mapreduce.Reducer

      `run`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MovieGenre.MovieGenreReducer

          public MovieGenre.MovieGenreReducer()

  - ### Method Detail

    - #### reduce

          public void reduce(org.apache.hadoop.io.IntWritable genreID,
                    java.lang.Iterable<org.apache.hadoop.io.IntWritable> movieIDs,
                    org.apache.hadoop.mapreduce.Reducer.Context context)
                      throws java.io.IOException,
                             java.lang.InterruptedException

      The reduce function. The output per line is:
      - genre-id <list of movie-ids>
      Overrides:
        `reduce` in class `org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>`
      Throws:
        `java.io.IOException`
        `java.lang.InterruptedException`

Copyright © 2013, 2016, Oracle and/or its affiliates. All rights reserved.